﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using GlobalObjects;

namespace WCFServiceWebRole1.DataObjects
{
    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class DeviceRegistrationRequestDataContract
    {

        [DataMember, Newtonsoft.Json.JsonProperty]
        public int DeviceId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public List<SensorRegistrationRequest> Sensors { get; set; }
    }


    //[DataContract]
    //[Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    //public class DeviceDetails
    //{
    //    [DataMember, Newtonsoft.Json.JsonProperty,]
    //    public int UserId { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public int Id { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public String Name { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public String Location { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public String Privacy { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public String APIKey { get; set; }
    //    [DataMember, Newtonsoft.Json.JsonProperty]
    //    public String Description { get; set; }
    //}

    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class DeviceDetailsResponse
    {
        [DataMember(Name = "href"), Newtonsoft.Json.JsonProperty]
        public Uri resource { get; set; }
        [DataMember(Name = "response"), Newtonsoft.Json.JsonProperty]
        public Device response { get; set; }
    }

    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class NotificationResponse
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int notificationId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int deviceId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int sensorId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public string deviceName { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public string reason { get; set; }
    }

    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class NotificationRequest
    {
      
        [DataMember(IsRequired=true), Newtonsoft.Json.JsonProperty]
        public int deviceId { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public int sensorId { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public int userId { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public string reason { get; set; }
    }

   

}